<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
    <meta content="telephone=no" name="format-detection"/>
    <meta content="email=no" name="format-detection"/>
    <title>园区超市</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        #goodsList{
            margin:0; padding:0;
            width: 100%;
            list-style:none;

        }
        .goodsCell{
            position: relative;
            overflow: hidden;
            margin-top: 10px;
            width: 100%;
            height: 4.8rem;
            background-size: 100% 100%;
        }
        .goodsCell img{
            position: absolute;
            overflow: hidden;
            width: 100%;
            height: 100%;
            background-color: gray;
        }
        .goodsTitle{
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 1.06667rem;
            text-indent: 0.32rem;
            font-size: 0.34667rem;
            line-height: 1.06667rem;
            color: #FFFFFF;
            background-color: rgba(0,0,0,0.5);
        }
    </style>
</head>
<body>
<ul id="goodsList">
</ul>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/vdTool.js"></script>
<script>
    window.onload = function () {
        var html = document.getElementsByTagName("html")[0];
        html.style.fontSize = document.documentElement.clientWidth/10 + 'px';
        window.onresize = function(){
            html.style.fontSize = document.documentElement.clientWidth / 10 + 'px';
        };
    };
    var jq=jQuery.noConflict();
    var params = getParams();
    getJsonData('goods.json',function (data) {
        jq(data).each(function () {
            var url = this['url']+'?type='+this['type']+'&token='+params['token'];
            var cell = '<a href="'+url+'"</a> <li class="goodsCell"><img src="'+this['img']+'"><div class="goodsTitle">'+this['title']+'</div></li>';
            jq('#goodsList').append(cell);
        });
    });

</script>
</body>
</html>